package com.gds.wiki.cloud.memberCenter.server.modular.member.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gds.wiki.cloud.memberCenter.client.member.model.Member;
import com.gds.wiki.cloud.memberCenter.client.member.model.query.MemberQuery;
import com.gds.wiki.cloud.memberCenter.server.modular.member.mapper.MemberMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MemberService  extends ServiceImpl<MemberMapper, Member> {

    @Autowired
    private MemberMapper memberMapper;

    public IPage selectPage(MemberQuery memberQuery){
        Page<Member> page=new Page<>(memberQuery.getSize(),memberQuery.getPage());
        Wrapper<Member> wrapper=new QueryWrapper<>();
        return memberMapper.selectPage(page,wrapper);
    };


}
